home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
pluginy Firefox
/
59454
/
59454.xpi
/
content
/
util
/
BrowserUtils.js
next >
Wrap
Text File
|
2010-01-14
|
621b
|
25 lines
// create a namespace for our Utils.
var BartBrowserUtils = BartModule.createNamespace("bart.ibrowser.BrowserUtils");
BartBrowserUtils.openNewLocation = function(url)
{
window.content.document.location = url;
window.content.focus();
};
/**
* Open a new tab.
* Select indicates if the new opened tab should be active. Default is true.
* Return the new created tab.
*/
BartBrowserUtils.newTab = function(url, select)
{
var u = url || "";
var s = (select == undefined ? true : select);
var t = window.getBrowser().addTab(u);
if(s)
window.getBrowser().selectedTab = t;
return t;
};